// <editor-fold defaultstate="collapsed" desc="Đưng quan tâm"> 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.manhinhchinh;

// <editor-fold defaultstate="collapsed" desc="imports">
import gui.event.manhinhchinh.MainFrame_evt;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.SplashScreen;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JTabbedPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
// </editor-fold>

/**
 *
 * @author nv_ca
 */
public class MainFrame extends javax.swing.JFrame implements ActionListener {

    /**
     * Creates new form MainFrame
     */
    public MainFrame() {
        initComponents();
        spashScreen();
        setMaxWindowsSize();
        setIcon();
        setTabbedPaneProperties();
        jTabbedPane.addTab("Màn hình chính", new MainFlowChart());
    }

    // <editor-fold defaultstate="collapsed" desc="properties-đừng đụng vào">
    private void setIcon() {
        ImageIcon icon = new ImageIcon(this.getClass().getResource("/gui/images/ultility/icon.png"));
        this.setIconImage(icon.getImage());
    }
    
    private void setMaxWindowsSize() {// set full screen on any windows
        Rectangle dim = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
        int h = dim.height;
        int w = dim.width;
        this.setBounds(00, 00, w, h);
    }
    
    private void setTabbedPaneProperties() {
        jTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);//set tab layout
    }
    // </editor-fold>

    // <editor-fold defaultstate="collapsed" desc="splash screen-đừng đụng vào">
    private static void renderSplashFrame(Graphics2D g, int frame) {
        final String[] comps = {"Hồ sơ bác sĩ", "Hồ sơ vật nuôi", "Hồ sơ bệnh án"};
        g.setComposite(AlphaComposite.Clear);
        g.fillRect(20, 320, 200, 40);
        g.setPaintMode();
        g.setColor(Color.BLACK);
        g.drawString("Loading " + comps[(frame / 5) % 3] + "...", 20, 333);
    }
    
    private void spashScreen() {
        final SplashScreen splash = SplashScreen.getSplashScreen();
        if (splash == null) {
            System.out.println("SplashScreen.getSplashScreen() returned null");
            return;
        }
        Graphics2D g = splash.createGraphics();
        if (g == null) {
            System.out.println("g is null");
            return;
        }
        for (int i = 0; i < 100; i++) {
            renderSplashFrame(g, i);
            splash.update();
            try {
                Thread.sleep(90);
            } catch (InterruptedException e) {
            }
        }
        splash.close();
        setVisible(true);
        toFront();
    }
    // </editor-fold>

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar = new javax.swing.JToolBar();
        btnThemKhachHangMoi = new javax.swing.JButton();
        btnThemVatNuoi = new javax.swing.JButton();
        btnThemBenhAn = new javax.swing.JButton();
        btnThemTiemChung = new javax.swing.JButton();
        btnCapNhatThuoc = new javax.swing.JButton();
        jTabbedPane = new javax.swing.JTabbedPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        menuCauHinh = new javax.swing.JMenu();
        miCauHinhServer = new javax.swing.JMenuItem();
        miThoatChuongTinh = new javax.swing.JMenuItem();
        menuKhachHang = new javax.swing.JMenu();
        miKHQuanLy = new javax.swing.JMenuItem();
        miKHThem = new javax.swing.JMenuItem();
        miKHSua = new javax.swing.JMenuItem();
        miKHSaoLuu = new javax.swing.JMenuItem();
        miKHPhucHoi = new javax.swing.JMenuItem();
        miKHTimKiem = new javax.swing.JMenuItem();
        menuVatNuoi = new javax.swing.JMenu();
        miVNQuanLy = new javax.swing.JMenuItem();
        miVNThem = new javax.swing.JMenuItem();
        miVNSua = new javax.swing.JMenuItem();
        miVNHuy = new javax.swing.JMenuItem();
        miVNTimKiem = new javax.swing.JMenuItem();
        menuBenhAn = new javax.swing.JMenu();
        miBAQuanLy = new javax.swing.JMenuItem();
        miBATao = new javax.swing.JMenuItem();
        miBASua = new javax.swing.JMenuItem();
        miBAXoa = new javax.swing.JMenuItem();
        miBATiemKiem = new javax.swing.JMenuItem();
        menuTiemChung = new javax.swing.JMenu();
        miTCQuanLy = new javax.swing.JMenuItem();
        miTCTao = new javax.swing.JMenuItem();
        miTCSua = new javax.swing.JMenuItem();
        miTCXoa = new javax.swing.JMenuItem();
        miTCTim = new javax.swing.JMenuItem();
        menuThuoc = new javax.swing.JMenu();
        miThuocQuanLy = new javax.swing.JMenuItem();
        miThuocCapNhat = new javax.swing.JMenuItem();
        miThuocThem = new javax.swing.JMenuItem();
        miThuocXoa = new javax.swing.JMenuItem();
        miThuocTimKiem = new javax.swing.JMenuItem();
        jMenu7 = new javax.swing.JMenu();
        jMenu8 = new javax.swing.JMenu();
        jMenu9 = new javax.swing.JMenu();
        jMenu10 = new javax.swing.JMenu();
        jMenu11 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Hệ Thống Quản Lý Phòng Mạch Thú Y");

        jToolBar.setRollover(true);

        btnThemKhachHangMoi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-48 addnew.png"))); // NOI18N
        btnThemKhachHangMoi.setToolTipText("Thêm Khách Hàng");
        btnThemKhachHangMoi.setFocusable(false);
        btnThemKhachHangMoi.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnThemKhachHangMoi.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnThemKhachHangMoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemKhachHangMoiActionPerformed(evt);
            }
        });
        jToolBar.add(btnThemKhachHangMoi);

        btnThemVatNuoi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-48 addnew.png"))); // NOI18N
        btnThemVatNuoi.setToolTipText("Thêm Vật Nuôi Mới");
        btnThemVatNuoi.setFocusable(false);
        btnThemVatNuoi.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnThemVatNuoi.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnThemVatNuoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemVatNuoiActionPerformed(evt);
            }
        });
        jToolBar.add(btnThemVatNuoi);

        btnThemBenhAn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-48 addnew.png"))); // NOI18N
        btnThemBenhAn.setToolTipText("Tạo Bệnh Án Mới");
        btnThemBenhAn.setFocusable(false);
        btnThemBenhAn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnThemBenhAn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnThemBenhAn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemBenhAnActionPerformed(evt);
            }
        });
        jToolBar.add(btnThemBenhAn);

        btnThemTiemChung.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-48 addnew.png"))); // NOI18N
        btnThemTiemChung.setToolTipText("Tạo Mới Hồ Sơ Tiêm Chủng");
        btnThemTiemChung.setFocusable(false);
        btnThemTiemChung.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnThemTiemChung.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnThemTiemChung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemTiemChungActionPerformed(evt);
            }
        });
        jToolBar.add(btnThemTiemChung);

        btnCapNhatThuoc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-48 update.png"))); // NOI18N
        btnCapNhatThuoc.setToolTipText("Cập Nhật Số Lượng Thuốc");
        btnCapNhatThuoc.setFocusable(false);
        btnCapNhatThuoc.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCapNhatThuoc.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnCapNhatThuoc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCapNhatThuocActionPerformed(evt);
            }
        });
        jToolBar.add(btnCapNhatThuoc);

        menuCauHinh.setText("Cấu Hình");

        miCauHinhServer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/cauhinh/Customize-01-32.png"))); // NOI18N
        miCauHinhServer.setText("Cấu Hình Server");
        miCauHinhServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miCauHinhServerActionPerformed(evt);
            }
        });
        menuCauHinh.add(miCauHinhServer);

        miThoatChuongTinh.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/cauhinh/Data-Export-32.png"))); // NOI18N
        miThoatChuongTinh.setText("Thoát Chương Trình");
        miThoatChuongTinh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThoatChuongTinhActionPerformed(evt);
            }
        });
        menuCauHinh.add(miThoatChuongTinh);

        jMenuBar1.add(menuCauHinh);

        menuKhachHang.setText("Khách Hàng");

        miKHQuanLy.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.ALT_MASK));
        miKHQuanLy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32 manage.png"))); // NOI18N
        miKHQuanLy.setText("Quản Lý Hồ Sơ Khách Hàng");
        miKHQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHQuanLyActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHQuanLy);

        miKHThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32 addnew.png"))); // NOI18N
        miKHThem.setText("Thêm Khách Hàng");
        miKHThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHThemActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHThem);

        miKHSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32 edit.png"))); // NOI18N
        miKHSua.setText("Sửa Thông Tin Khách Hàng");
        miKHSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHSuaActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHSua);

        miKHSaoLuu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32 backup.png"))); // NOI18N
        miKHSaoLuu.setText("Sao Lưu Khách Hàng");
        miKHSaoLuu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHSaoLuuActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHSaoLuu);

        miKHPhucHoi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32  restore.png"))); // NOI18N
        miKHPhucHoi.setText("Phục Hồi Khách Hàng");
        miKHPhucHoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHPhucHoiActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHPhucHoi);

        miKHTimKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/khachhang/Customer-32 search.png"))); // NOI18N
        miKHTimKiem.setText("Tìm Kiếm Khách Hàng");
        miKHTimKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miKHTimKiemActionPerformed(evt);
            }
        });
        menuKhachHang.add(miKHTimKiem);

        jMenuBar1.add(menuKhachHang);

        menuVatNuoi.setText("Vật Nuôi");

        miVNQuanLy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-32 manage.png"))); // NOI18N
        miVNQuanLy.setText("Quản Lý Vật Nuôi");
        miVNQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miVNQuanLyActionPerformed(evt);
            }
        });
        menuVatNuoi.add(miVNQuanLy);

        miVNThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-32 addnew.png"))); // NOI18N
        miVNThem.setText("Thêm Vật Nuôi Mới");
        miVNThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miVNThemActionPerformed(evt);
            }
        });
        menuVatNuoi.add(miVNThem);

        miVNSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-32 edit.png"))); // NOI18N
        miVNSua.setText("Sửa Thông Tin Vật Nuôi");
        miVNSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miVNSuaActionPerformed(evt);
            }
        });
        menuVatNuoi.add(miVNSua);

        miVNHuy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-32 delete.png"))); // NOI18N
        miVNHuy.setText("Hủy Vật Nuôi");
        miVNHuy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miVNHuyActionPerformed(evt);
            }
        });
        menuVatNuoi.add(miVNHuy);

        miVNTimKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/vatnuoi/Footprint-32 search.png"))); // NOI18N
        miVNTimKiem.setText("Tìm Kiếm Vật Nuôi");
        miVNTimKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miVNTimKiemActionPerformed(evt);
            }
        });
        menuVatNuoi.add(miVNTimKiem);

        jMenuBar1.add(menuVatNuoi);

        menuBenhAn.setText("Bệnh Án");

        miBAQuanLy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-32 manage.png"))); // NOI18N
        miBAQuanLy.setText("Quản Lý Bệnh Án");
        miBAQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miBAQuanLyActionPerformed(evt);
            }
        });
        menuBenhAn.add(miBAQuanLy);

        miBATao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-32 addnew.png"))); // NOI18N
        miBATao.setText("Tạo Bệnh Án Mới");
        miBATao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miBATaoActionPerformed(evt);
            }
        });
        menuBenhAn.add(miBATao);

        miBASua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-32 edit.png"))); // NOI18N
        miBASua.setText("Sửa Thông Tìn Bệnh Án");
        miBASua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miBASuaActionPerformed(evt);
            }
        });
        menuBenhAn.add(miBASua);

        miBAXoa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-32 delete.png"))); // NOI18N
        miBAXoa.setText("Xóa Bệnh Án");
        miBAXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miBAXoaActionPerformed(evt);
            }
        });
        menuBenhAn.add(miBAXoa);

        miBATiemKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/benhan/Book-Close-32 search.png"))); // NOI18N
        miBATiemKiem.setText("Tìm Kiếm Bệnh Án");
        miBATiemKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miBATiemKiemActionPerformed(evt);
            }
        });
        menuBenhAn.add(miBATiemKiem);

        jMenuBar1.add(menuBenhAn);

        menuTiemChung.setText("Tiêm Chủng");

        miTCQuanLy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-32 manage.png"))); // NOI18N
        miTCQuanLy.setText("Quản Lý Hồ Sơ Tiêm Chủng");
        miTCQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miTCQuanLyActionPerformed(evt);
            }
        });
        menuTiemChung.add(miTCQuanLy);

        miTCTao.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-32 addnew.png"))); // NOI18N
        miTCTao.setText("Tạo Hồ Sơ Tiêm Chủng Mới");
        miTCTao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miTCTaoActionPerformed(evt);
            }
        });
        menuTiemChung.add(miTCTao);

        miTCSua.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-32 edit.png"))); // NOI18N
        miTCSua.setText("Sửa Thông Tin Hồ Sơ Tiêm Chủng");
        miTCSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miTCSuaActionPerformed(evt);
            }
        });
        menuTiemChung.add(miTCSua);

        miTCXoa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-32 delete.png"))); // NOI18N
        miTCXoa.setText("Xóa Hồ Sơ Tiêm Chủng");
        miTCXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miTCXoaActionPerformed(evt);
            }
        });
        menuTiemChung.add(miTCXoa);

        miTCTim.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/tiemchung/Syringe-02-32 search.png"))); // NOI18N
        miTCTim.setText("Tìm Hồ Sơ Tiêm Chủng");
        miTCTim.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miTCTimActionPerformed(evt);
            }
        });
        menuTiemChung.add(miTCTim);

        jMenuBar1.add(menuTiemChung);

        menuThuoc.setText("Thuốc");

        miThuocQuanLy.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-32 manage.png"))); // NOI18N
        miThuocQuanLy.setText("Quản Lý Thuốc");
        miThuocQuanLy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThuocQuanLyActionPerformed(evt);
            }
        });
        menuThuoc.add(miThuocQuanLy);

        miThuocCapNhat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-32 update.png"))); // NOI18N
        miThuocCapNhat.setText("Cập Nhật Số Lượng Thuốc");
        miThuocCapNhat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThuocCapNhatActionPerformed(evt);
            }
        });
        menuThuoc.add(miThuocCapNhat);

        miThuocThem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-32 addnew.png"))); // NOI18N
        miThuocThem.setText("Thêm Loại Thuốc Mới");
        miThuocThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThuocThemActionPerformed(evt);
            }
        });
        menuThuoc.add(miThuocThem);

        miThuocXoa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-32 delete.png"))); // NOI18N
        miThuocXoa.setText("Xóa Thuốc");
        miThuocXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThuocXoaActionPerformed(evt);
            }
        });
        menuThuoc.add(miThuocXoa);

        miThuocTimKiem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/thuoc/Pill-32 search.png"))); // NOI18N
        miThuocTimKiem.setText("Tìm Kiếm Thông Tin Thuốc");
        miThuocTimKiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miThuocTimKiemActionPerformed(evt);
            }
        });
        menuThuoc.add(miThuocTimKiem);

        jMenuBar1.add(menuThuoc);

        jMenu7.setText("Dịch Vụ");
        jMenuBar1.add(jMenu7);

        jMenu8.setText("Bán Lẻ");
        jMenuBar1.add(jMenu8);

        jMenu9.setText("Thống Kê");
        jMenuBar1.add(jMenu9);

        jMenu10.setText("Nhân Sự");
        jMenuBar1.add(jMenu10);

        jMenu11.setText("Trợ Giúp");
        jMenuBar1.add(jMenu11);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 767, Short.MAX_VALUE)
            .addComponent(jToolBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
//</editor-fold>     
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Khách Hàng"> 
    private void miKHThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHThemActionPerformed
        MainFrame_evt.toolbarThemKhachHang(this);
    }//GEN-LAST:event_miKHThemActionPerformed

    private void miKHSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHSuaActionPerformed
        MainFrame_evt.miSuaThongTinKhachHang(this);
    }//GEN-LAST:event_miKHSuaActionPerformed

    private void miKHSaoLuuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHSaoLuuActionPerformed
        MainFrame_evt.miSaoLuuKhachHang(this);
    }//GEN-LAST:event_miKHSaoLuuActionPerformed

    private void miKHPhucHoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHPhucHoiActionPerformed
        MainFrame_evt.miPhucHoiKhachHang(this);
    }//GEN-LAST:event_miKHPhucHoiActionPerformed

    private void miKHTimKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHTimKiemActionPerformed
        MainFrame_evt.miTimKiemKhachHang(this);
    }//GEN-LAST:event_miKHTimKiemActionPerformed

    private void miKHQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miKHQuanLyActionPerformed
        MainFrame_evt.miQuanLyKhachHang(jTabbedPane);
    }//GEN-LAST:event_miKHQuanLyActionPerformed
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Cấu Hình"> 
    private void miCauHinhServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miCauHinhServerActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_miCauHinhServerActionPerformed

    private void miThoatChuongTinhActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThoatChuongTinhActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_miThoatChuongTinhActionPerformed
    //</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Vật Nuôi"> 
    private void miVNQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miVNQuanLyActionPerformed
        MainFrame_evt.miQuanLyVN(jTabbedPane);
    }//GEN-LAST:event_miVNQuanLyActionPerformed

    private void miVNThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miVNThemActionPerformed
        MainFrame_evt.miThemVN(this);
    }//GEN-LAST:event_miVNThemActionPerformed

    private void miVNSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miVNSuaActionPerformed
        MainFrame_evt.miSuaVN(this);
    }//GEN-LAST:event_miVNSuaActionPerformed

    private void miVNHuyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miVNHuyActionPerformed
        MainFrame_evt.miHuyVN(this);
    }//GEN-LAST:event_miVNHuyActionPerformed

    private void miVNTimKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miVNTimKiemActionPerformed
        MainFrame_evt.miTimKiemVN(this);
    }//GEN-LAST:event_miVNTimKiemActionPerformed
    //</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Bệnh Án"> 
    private void miBAQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miBAQuanLyActionPerformed
        MainFrame_evt.miQuanLyBenhAn(jTabbedPane);
    }//GEN-LAST:event_miBAQuanLyActionPerformed

    private void miBATaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miBATaoActionPerformed
       MainFrame_evt.miTaoBenhAnMoi(this);
    }//GEN-LAST:event_miBATaoActionPerformed

    private void miBASuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miBASuaActionPerformed
        MainFrame_evt.miSuaThongTinBenhAn(this);
    }//GEN-LAST:event_miBASuaActionPerformed

    private void miBAXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miBAXoaActionPerformed
        MainFrame_evt.miXoaBenhAn(this);
    }//GEN-LAST:event_miBAXoaActionPerformed

    private void miBATiemKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miBATiemKiemActionPerformed
        MainFrame_evt.miTimKiemBenhAn(this);
    }//GEN-LAST:event_miBATiemKiemActionPerformed
    //</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Tiêm Chủng"> 
    private void miTCQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miTCQuanLyActionPerformed
        MainFrame_evt.miQuanLyTiemChung(jTabbedPane);
    }//GEN-LAST:event_miTCQuanLyActionPerformed

    private void miTCTaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miTCTaoActionPerformed
        MainFrame_evt.miThemHoSoTiemChung(this);
    }//GEN-LAST:event_miTCTaoActionPerformed

    private void miTCSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miTCSuaActionPerformed
        MainFrame_evt.miSuaHoSoTiemChung(this);
    }//GEN-LAST:event_miTCSuaActionPerformed

    private void miTCXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miTCXoaActionPerformed
        MainFrame_evt.miXoaHoSoTiemChung(this);
    }//GEN-LAST:event_miTCXoaActionPerformed

    private void miTCTimActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miTCTimActionPerformed
        MainFrame_evt.miTimKiemHoSoTiemChung(this);
    }//GEN-LAST:event_miTCTimActionPerformed
    //</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="Menu Item Events - Phần Thuốc"> 
    private void miThuocQuanLyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThuocQuanLyActionPerformed
        MainFrame_evt.miQuanLyThuoc(jTabbedPane);
    }//GEN-LAST:event_miThuocQuanLyActionPerformed

    private void miThuocCapNhatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThuocCapNhatActionPerformed
        MainFrame_evt.miCapNhatThuoc(this);
    }//GEN-LAST:event_miThuocCapNhatActionPerformed

    private void miThuocThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThuocThemActionPerformed
        MainFrame_evt.miThemThuoc(this);
    }//GEN-LAST:event_miThuocThemActionPerformed

    private void miThuocXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThuocXoaActionPerformed
        MainFrame_evt.miXoaThuoc(this);
    }//GEN-LAST:event_miThuocXoaActionPerformed

    private void miThuocTimKiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miThuocTimKiemActionPerformed
        MainFrame_evt.miTimKiemThuoc(this);
    }//GEN-LAST:event_miThuocTimKiemActionPerformed
    //</editor-fold> 
    // <editor-fold defaultstate="collapsed" desc="ToolBar Events"> 
    private void btnThemKhachHangMoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemKhachHangMoiActionPerformed
        MainFrame_evt.toolbarThemKhachHang(this);
    }//GEN-LAST:event_btnThemKhachHangMoiActionPerformed

    private void btnThemVatNuoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemVatNuoiActionPerformed
        MainFrame_evt.miThemVN(this);
    }//GEN-LAST:event_btnThemVatNuoiActionPerformed

    private void btnThemBenhAnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemBenhAnActionPerformed
        MainFrame_evt.toolbarThemBenhAn(this);
    }//GEN-LAST:event_btnThemBenhAnActionPerformed

    private void btnThemTiemChungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemTiemChungActionPerformed
        MainFrame_evt.toolbarThemHoSoTiemChung(this);
    }//GEN-LAST:event_btnThemTiemChungActionPerformed

    private void btnCapNhatThuocActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCapNhatThuocActionPerformed
        MainFrame_evt.toolbarCapNhatThuoc(this);
    }//GEN-LAST:event_btnCapNhatThuocActionPerformed
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Đừng quan tâm"> 
    /**
     * @param args the command line arguments
     */
    
    public static void main(String args[]) {
        try {
            /* Set the Nimbus look and feel */
            //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
            /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
             * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
             */
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            //</editor-fold>
        } catch (Exception ex) {
            Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
        }

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
   

// <editor-fold defaultstate="collapsed" desc="Các biến trong chương trình">
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCapNhatThuoc;
    private javax.swing.JButton btnThemBenhAn;
    private javax.swing.JButton btnThemKhachHangMoi;
    private javax.swing.JButton btnThemTiemChung;
    private javax.swing.JButton btnThemVatNuoi;
    private javax.swing.JMenu jMenu10;
    private javax.swing.JMenu jMenu11;
    private javax.swing.JMenu jMenu7;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar1;
    public static javax.swing.JTabbedPane jTabbedPane;
    private javax.swing.JToolBar jToolBar;
    private javax.swing.JMenu menuBenhAn;
    private javax.swing.JMenu menuCauHinh;
    private javax.swing.JMenu menuKhachHang;
    private javax.swing.JMenu menuThuoc;
    private javax.swing.JMenu menuTiemChung;
    private javax.swing.JMenu menuVatNuoi;
    private javax.swing.JMenuItem miBAQuanLy;
    private javax.swing.JMenuItem miBASua;
    private javax.swing.JMenuItem miBATao;
    private javax.swing.JMenuItem miBATiemKiem;
    private javax.swing.JMenuItem miBAXoa;
    private javax.swing.JMenuItem miCauHinhServer;
    private javax.swing.JMenuItem miKHPhucHoi;
    private javax.swing.JMenuItem miKHQuanLy;
    private javax.swing.JMenuItem miKHSaoLuu;
    private javax.swing.JMenuItem miKHSua;
    private javax.swing.JMenuItem miKHThem;
    private javax.swing.JMenuItem miKHTimKiem;
    private javax.swing.JMenuItem miTCQuanLy;
    private javax.swing.JMenuItem miTCSua;
    private javax.swing.JMenuItem miTCTao;
    private javax.swing.JMenuItem miTCTim;
    private javax.swing.JMenuItem miTCXoa;
    private javax.swing.JMenuItem miThoatChuongTinh;
    private javax.swing.JMenuItem miThuocCapNhat;
    private javax.swing.JMenuItem miThuocQuanLy;
    private javax.swing.JMenuItem miThuocThem;
    private javax.swing.JMenuItem miThuocTimKiem;
    private javax.swing.JMenuItem miThuocXoa;
    private javax.swing.JMenuItem miVNHuy;
    private javax.swing.JMenuItem miVNQuanLy;
    private javax.swing.JMenuItem miVNSua;
    private javax.swing.JMenuItem miVNThem;
    private javax.swing.JMenuItem miVNTimKiem;
    // End of variables declaration//GEN-END:variables
    // </editor-fold>
    @Override
    public void actionPerformed(ActionEvent e) {
        
    }
}
//</editor-fold>